home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.UserControl IncLabel
- ClientHeight = 1500
- ClientLeft = 0
- ClientTop = 0
- ClientWidth = 4410
- ScaleHeight = 1500
- ScaleWidth = 4410
- ToolboxBitmap = "IncLabel.ctx":0000
- Begin VB.Timer tmrActualiza
- Interval = 100
- Left = 120
- Top = 120
- End
- Begin VB.Label lblTexto
- Height = 735
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 4215
- End
- Attribute VB_Name = "IncLabel"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = True
- '*****************************************************
- ' Curso de creaci
- n de controles en VB5 para PCActual
- ' Fichero: IncLabel (IncLabel.ctl)
- ' Autor: Lleonard del R
- o (intec)
- ' Fecha: 1/9/97
- ' Versi
- n: 1.0
- ' Descr: Control "etiqueta incremental", en el que
- ' van apareciendo poco a poco los caracteres
- ' que forman el texto.
- '*****************************************************
- Option Explicit
- '*****************************************************
- ' Material privado
- '*****************************************************
- Private m_sCaption As String
- Private m_lIndice As Long
- '*****************************************************
- ' Funciones privadas de soporte
- '*****************************************************
- Private Sub ActualizarCaption()
- tmrActualiza.Enabled = False
- m_lIndice = 0
- tmrActualiza.Enabled = True
- End Sub
- Private Sub tmrActualiza_Timer()
- If m_lIndice = 0 Then lblTexto.Caption = ""
- m_lIndice = m_lIndice + 1
- lblTexto.Caption = lblTexto.Caption & Mid$(m_sCaption, m_lIndice, 1)
- If m_lIndice > Len(m_sCaption) Then
- tmrActualiza.Enabled = False
- End If
- End Sub
- Private Sub UserControl_Resize()
- lblTexto.Width = UserControl.ScaleWidth
- lblTexto.Height = UserControl.ScaleHeight
- End Sub
- '*****************************************************
- ' Persistencia de propiedades
- '*****************************************************
- Private Sub UserControl_InitProperties()
- m_sCaption = ""
- ActualizarCaption
- End Sub
- Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
- m_sCaption = PropBag.ReadProperty("Caption", "")
- ActualizarCaption
- End Sub
- Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
- Call PropBag.WriteProperty("Caption", m_sCaption, "")
- End Sub
- '*****************************************************
- ' Propiedades y m
- todos p
- blicos
- '*****************************************************
- Public Property Get Caption() As String
- Caption = m_sCaption
- End Property
- Public Property Let Caption(ByVal Value As String)
- m_sCaption = Value
- PropertyChanged "Caption"
- ActualizarCaption
- End Property
-